package org.bysun.ggcip.http;

/**
 * User: bysun
 * Date: 2014/6/7 0007
 * Time: 13:47
 */
public class IpDto implements Comparable<IpDto>{
    private String ip;
    private long connTime;
    private boolean useful;

    public IpDto() {
    }

    public IpDto(String ip) {
        this.ip = ip;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public long getConnTime() {
        return connTime;
    }

    public void setConnTime(long connTime) {
        this.connTime = connTime;
    }

    public boolean isUseful() {
        return useful;
    }

    public void setUseful(boolean useful) {
        this.useful = useful;
    }

    @Override
    public int compareTo(IpDto o) {
        return this.getConnTime()>o.getConnTime()?1:this.getConnTime()<o.getConnTime()?-1:0;
    }
}
